package org.ctd.springframework.beans.factory.support;

import org.ctd.springframework.beans.exception.bean.BeansException;
import org.ctd.springframework.beans.factory.BeanFactory;
import org.ctd.springframework.beans.factory.config.ConfigurableListableBeanFactory;

/**
 * DefaultListableBeanFactory
 * spring 注册 bean 加载 bean 的 默认实现
 *
 * @author chentudong
 * @time 2019/3/24 20:28
 */
public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFactory implements ConfigurableListableBeanFactory, BeanDefinitionRegistry {
    public DefaultListableBeanFactory(BeanFactory parentBeanFactory) {
        super(parentBeanFactory);
    }

    /**
     * 获取父工厂
     *
     * @return BeanFactory
     */
    @Override
    public BeanFactory getParentBeanFactory() {
        return null;
    }

    /**
     * 获取对应的bean
     *
     * @param name name
     * @return Object
     * @throws BeansException BeansException
     */
    @Override
    public Object getBean(String name) throws BeansException {
        return null;
    }
}
